<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Object Method</h2>

<p>Object data can be accessed using property stored as a function.</p>

<p id="demo"></p>

<script>
// Create an object:
var person = {
  firstName: "Sanu",
  lastName : "santh",
  fullName : function() {
    return this.firstName + " " + this.lastName;
  }
};
// Display data from the object using a method:
document.getElementById("demo").innerHTML = person.fullName();
</script>
<br> 
<center>
<p> Creater By <b> Sanusanth </b> </p>
<a href="https://github.com/sanusanth">Visit Sanusanth</a>
</center>
</body>
</html>
